package com.hspedu.homework.homework05;

/**
 * @Author Stringzhua
 * @Date 2024/3/3 17:20
 * description:测试类
 * 设计父类--员工类
 * 子类:工人类(Worker),农民类(Peasant),教师类(Teacher),科学家类(Scientist),服务生类(Waiter)
 * (1)其中,工人、农民、服务生只有基本工资 sal
 * (2)教师除基本工资外,还有课酬(元/天) classDay,classSal
 * (3)科学家除基本工资外,还有年终奖 bonus
 * (4)编写一个测试类,将各种类型的员工的工资全打印出来
 */
public class Test {
    public static void main(String[] args) {
        Worker jack = new Worker("jack", 10000);
        jack.setSalMonth(15);//灵活的修改带薪月
        jack.printSal();

        Peasant smith = new Peasant("smith", 20000);
        smith.printSal();

        Teacher teacher = new Teacher("爪爪", 2000);
        //老师有课时费
        teacher.setClassSal(1000);
        teacher.setClassDays(360);
        teacher.printSal();

        //科学家
        Scientist scientist = new Scientist("钟南山", 20000);
        scientist.setBonus(2000000);
        scientist.printSal();

        //服务生
        Waiter waiter = new Waiter("爪爪", 2000);
        waiter.printSal();
    }
}
